1. Field of the Invention
The present invention relates to a comparison circuit for outputting an interrupt request signal to the CPU (central processing unit) a single-chip microcomputer.
2. Description of the Prior Art
FIG. 7 shows a block diagram of the conventional general comparison circuit. In FIG. 7, numeral 1 is a comparison value setting register, 2 is a D-A (digital to analog) converter, 3 is a control circuit, 4 is an analog comparator, 5 is a comparison result register, 6 is an analog input, and 40 is a CPU. The control circuit 3, as shown in FIG. 8, consists of a starting register 3a whose set value is changed by the CPU 40 and a comparator timing generating circuit 3b controlled by the set value of the starting register 3a, which operates the analog comparator 4 and the comparison result register 5 according to the command of the CPU 40.
The following is the description of operations of the CPU 40. The digital value set to the comparison value setting register 1 is converted into an analog value by the D-A converter 2 to compare the analog voltage with the analog input 6. When the analog input is larger than the analog voltage, the comparison result register 5 is set. When the analog input is smaller than the analog voltage, the comparison result register 5 is reset. The control circuit 3 starts and ends comparison and initializes the comparison result register 5.
The above control circuit is applied to a vehicle air conditioner shown in FIG. 9. In FIG. 9, numeral 30 is a duct for leading the air at the indoor- and outdoor-air selecting door side (upstream side) to the mode selecting door side (downstream side) on which a heater core 32 connecting with an engine cooling water pipe 31 and an air mixing door 33 are installed. The opening of the air mixing door 33 is controlled by an actuator 34. A temperature sensor 35 is adjacently installed on the water pipe 31. The temperature signal output by the temperature sensor 35 is supplied as the analog input 6.
For warming-up of the engine with the above configuration, the air mixing door 33 is opened so that cold wind does not blow off from the foot spit hole at the downstream side when the water temperature reaches, for example, 40.degree. C. after the engine starts and hot air is blown off so that foots are not exposed to cold air when the water temperature exceeds 40.degree. C. Therefore, after it is decided that the water temperature exceeds 40.degree. C. by setting 40.degree. C. to the comparison value setting register 1, the opening of the air mixing door 33 is controlled according to various conditions. Because the conventional comparison circuit has the above configuration, it is necessary for the CPU to regularly start the comparator and check comparison results. Therefore, a large program is necessary for the sequential checking and the CPU load increases for value comparison by the comparator, causing the system performance to degrade.
For the example in FIG. 9, comparison for 40.degree. C. should be continued until the water temperature reaches 40.degree. C. Therefore, the CPU cannot execute other jobs during the period.